package com.tcm.service;

import com.tcm.entity.TestPaperShare;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.dto.param.TestPaperShareParam;
import com.tcm.entity.vo.TestPaperShareListResult;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author Guqier
* @description 针对表【ts_test_paper_share(试卷分享表)】的数据库操作Service
* @createDate 2023-08-02 11:33:41
*/
public interface TestPaperShareService extends IService<TestPaperShare> {

    @Transactional
    boolean shareTestPaper(TestPaperShareParam param, Long currUserId);

    List<TestPaperShareListResult> getSharedList(Long currUserId);

    @Transactional
    boolean canselShareTestPaper(List<Long> ids);

    List<TestPaperShareListResult> transferTestPaperShareToListResult(List<TestPaperShare> testPaperShareList);

    List<TestPaperShareListResult> getReceivedShareList(Long currUserId);

    @Transactional
    boolean confirmReceiveShare(Long shareId, Long currUserId);
}
